From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:30:29 +0000 (-0600) Subject: spell Datum (#1313) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2^2~77 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=bc88336ac4a5f24191d1e2174756fdd2f86e672d;p=gpsbabel.git spell Datum (#1313) --- diff --git a/defs.h b/defs.h index ae382c924..85465104c 100644 --- a/defs.h +++ b/defs.h @@ -116,7 +116,7 @@ constexpr double MPH_TO_MPS(double a) { return a * kMPSPerMPH;} constexpr double KNOTS_TO_MPS(double a) {return a * kMPSPerKnot;} constexpr int kDatumOSGB36 = 86; // GPS_Lookup_Datum_Index("OSGB36") -constexpr int kDautmWGS84 = 118; // GPS_Lookup_Datum_Index("WGS 84") +constexpr int kDatumWGS84 = 118; // GPS_Lookup_Datum_Index("WGS 84") /* diff --git a/exif.cc b/exif.cc index 14d194865..4982f5989 100644 --- a/exif.cc +++ b/exif.cc @@ -851,7 +851,7 @@ ExifFormat::exif_waypt_from_exif_app(ExifApp* app) const if (idatum < 0) { fatal(MYNAME ": Unknown GPSMapDatum \"%s\"!\n", datum.constData()); } - if (idatum != kDautmWGS84) { + if (idatum != kDatumWGS84) { GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0, &wpt->latitude, &wpt->longitude, &alt, idatum); } diff --git a/garmin_txt.cc b/garmin_txt.cc index db0db9a84..bf429eae0 100644 --- a/garmin_txt.cc +++ b/garmin_txt.cc @@ -119,7 +119,7 @@ GarminTxtFormat::convert_datum(const Waypoint* wpt, double* dest_lat, double* de { double alt; - if (datum_index == kDautmWGS84) { + if (datum_index == kDatumWGS84) { *dest_lat = wpt->latitude; *dest_lon = wpt->longitude; } else GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0, @@ -697,7 +697,7 @@ GarminTxtFormat::wr_init(const QString& fname) datum_index = kDatumOSGB36; break; case grid_swiss: /* force datum to WGS84 */ - datum_index = kDautmWGS84; + datum_index = kDatumWGS84; break; default: datum_index = gt_lookup_datum_index(datum_str, MYNAME); diff --git a/main.cc b/main.cc index 690950b4a..7667c1af9 100644 --- a/main.cc +++ b/main.cc @@ -804,7 +804,7 @@ main(int argc, char* argv[]) } assert(GPS_Lookup_Datum_Index("OSGB36") == kDatumOSGB36); - assert(GPS_Lookup_Datum_Index("WGS 84") == kDautmWGS84); + assert(GPS_Lookup_Datum_Index("WGS 84") == kDatumWGS84); Vecs::Instance().init_vecs(); FilterVecs::Instance().init_filter_vecs(); diff --git a/nmea.cc b/nmea.cc index e4087aa21..2a2c90d0d 100644 --- a/nmea.cc +++ b/nmea.cc @@ -191,7 +191,7 @@ NmeaFormat::nmea_add_wpt(Waypoint* wpt, route_head* trk) const // This also indicates to nmea_release_wpt that ownership has been // transferred to either the global_waypoint_list or global_track_list. wpt->extra_data = nullptr; - if (datum != kDautmWGS84) { + if (datum != kDatumWGS84) { double lat; double lon; double alt; @@ -223,7 +223,7 @@ NmeaFormat::rd_init(const QString& fname) { curr_waypt = nullptr; last_waypt = nullptr; - datum = kDautmWGS84; + datum = kDatumWGS84; had_checksum = false; CHECK_BOOL(opt_gprmc); diff --git a/ozi.cc b/ozi.cc index 8b981c4da..83d343b2b 100644 --- a/ozi.cc +++ b/ozi.cc @@ -126,7 +126,7 @@ OziFormat::ozi_set_time_str(const QString& str, Waypoint* waypointp) void OziFormat::ozi_convert_datum(Waypoint* wpt) const { - if (datum != kDautmWGS84) { + if (datum != kDatumWGS84) { double lat; double lon; double alt; diff --git a/parse.cc b/parse.cc index c1cb6b2ea..bd03cb42e 100644 --- a/parse.cc +++ b/parse.cc @@ -214,7 +214,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid, break; case grid_bng: - datum = kDautmWGS84; /* fix */ + datum = kDatumWGS84; /* fix */ format = "%2s %lf %lf%n"; ct = sscanf(str, format, map, &lx, &ly, @@ -246,7 +246,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid, double east; double north; - datum = kDautmWGS84; /* fix */ + datum = kDatumWGS84; /* fix */ format = "%lf %lf%n"; ct = sscanf(str, format, &east, &north, &result); @@ -273,7 +273,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid, lon = -lon; } - if (datum != kDautmWGS84) { + if (datum != kDatumWGS84) { double alt; GPS_Math_Known_Datum_To_WGS84_M(lat, lon, 0.0, &lat, &lon, &alt, datum); diff --git a/unicsv.cc b/unicsv.cc index 642af6262..ab1534de9 100644 --- a/unicsv.cc +++ b/unicsv.cc @@ -606,7 +606,7 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf) &wpt->latitude, &wpt->longitude, MYNAME); /* coordinates from parse_coordinates are in WGS84 don't convert a second time */ - src_datum = kDautmWGS84; + src_datum = kDatumWGS84; break; case fld_bng: @@ -614,7 +614,7 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf) &wpt->latitude, &wpt->longitude, MYNAME); /* coordinates from parse_coordinates are in WGS84 don't convert a second time */ - src_datum = kDautmWGS84; + src_datum = kDatumWGS84; break; case fld_bng_zone: @@ -630,11 +630,11 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf) break; case fld_swiss: - parse_coordinates(value, kDautmWGS84, grid_swiss, + parse_coordinates(value, kDatumWGS84, grid_swiss, &wpt->latitude, &wpt->longitude, MYNAME); /* coordinates from parse_coordinates are in WGS84 don't convert a second time */ - src_datum = kDautmWGS84; + src_datum = kDatumWGS84; break; case fld_swiss_easting: @@ -1029,15 +1029,15 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf) fatal(MYNAME ": Unable to convert BNG coordinates (%s %.f %.f)!\n", CSTR(bng_zone), bng_easting, bng_northing); } - src_datum = kDautmWGS84; /* don't convert afterwards */ + src_datum = kDatumWGS84; /* don't convert afterwards */ } else if ((swiss_easting != kUnicsvUnknown) && (swiss_northing != kUnicsvUnknown)) { GPS_Math_Swiss_EN_To_WGS84(swiss_easting, swiss_northing, &wpt->latitude, &wpt->longitude); - src_datum = kDautmWGS84; /* don't convert afterwards */ + src_datum = kDatumWGS84; /* don't convert afterwards */ } } - if ((src_datum != kDautmWGS84) && + if ((src_datum != kDatumWGS84) && (wpt->latitude != kUnicsvUnknown) && (wpt->longitude != kUnicsvUnknown)) { double alt; GPS_Math_Known_Datum_To_WGS84_M(wpt->latitude, wpt->longitude, 0.0, @@ -1286,7 +1286,7 @@ UnicsvFormat::unicsv_waypt_disp_cb(const Waypoint* wpt) QString shortname = wpt->shortname; const garmin_fs_t* gmsd = garmin_fs_t::find(wpt); - if (unicsv_datum_idx == kDautmWGS84) { + if (unicsv_datum_idx == kDatumWGS84) { lat = wpt->latitude; lon = wpt->longitude; alt = wpt->altitude; @@ -1684,7 +1684,7 @@ UnicsvFormat::wr_init(const QString& fname) unicsv_outp_flags.reset(); unicsv_grid_idx = grid_unknown; - unicsv_datum_idx = kDautmWGS84; + unicsv_datum_idx = kDatumWGS84; unicsv_fieldsep = kUnicsvFieldSep; unicsv_waypt_ct = 0; @@ -1709,7 +1709,7 @@ UnicsvFormat::wr_init(const QString& fname) } else if (unicsv_grid_idx == grid_swiss) /* ! ignore parameter "Datum" ! */ { - unicsv_datum_idx = kDautmWGS84; /* internal, becomes CH1903 */ + unicsv_datum_idx = kDatumWGS84; /* internal, becomes CH1903 */ } else { unicsv_datum_idx = gt_lookup_datum_index(opt_datum, MYNAME); } diff --git a/xcsv.cc b/xcsv.cc index b655b1087..23266cd6a 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -907,7 +907,7 @@ XcsvFormat::read() wpt_tmp->longitude = -wpt_tmp->longitude; } - if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDautmWGS84)) { + if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDatumWGS84)) { double alt; GPS_Math_Known_Datum_To_WGS84_M(wpt_tmp->latitude, wpt_tmp->longitude, 0.0, &wpt_tmp->latitude, &wpt_tmp->longitude, &alt, xcsv_file->gps_datum_idx); @@ -918,7 +918,7 @@ XcsvFormat::read() &wpt_tmp->longitude, parse_data.utm_easting, parse_data.utm_northing, parse_data.utm_zone, parse_data.utm_zonec, - kDautmWGS84); + kDatumWGS84); } if (parse_data.link_) { @@ -1036,7 +1036,7 @@ XcsvFormat::xcsv_waypt_pr(const Waypoint* wpt) description = shortname; } - if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDautmWGS84)) { + if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDatumWGS84)) { double alt; GPS_Math_WGS84_To_Known_Datum_M(latitude, longitude, 0.0, &latitude, &longitude, &alt, xcsv_file->gps_datum_idx);